<template>
  <div id="search">
    <div class="search_left"><span>查询的数据显示:</span></div>
    <div class="search_center_box"></div>
    <div class="search_right">
      <el-button type="primary" @click="search()">查询</el-button>
    </div>
    <div class="search_right">
      <el-input v-model="keyWord" placeholder="请输入关键字或详细内容"></el-input>
    </div>
  </div>
</template>

<script>
export default {
  name: "Search",
  data() {
    return {
      keyWord: ""
    }
  },
  methods: {
    search(){
      console.log('执行全局事件!')
      this.$bus.$emit('likeEmployees',this.keyWord);
    }
  },
  created() {

  }
}
</script>


<style scoped>
#search {
  margin: 10px auto;
  //width: 92.2%;
  width: 100%;
  height: 60px;
  background-color: white;
}

.search_left {
  width: 200px;
  float: left;
  margin-left: 10px;
  span {
    display: block;
    margin-top: 10px;
    font-family: 微软雅黑;
    font-size: 20px;
    color: black;

    font-weight: bold;
  }
}

.search_center_box {
  margin-right: 20px;
}

.search_right {
  margin-top: 10px;
  margin-right: 10px;
  float: right;
}
</style>
